/**
 * 
 */
package interfaces.kernel;

/**
 * @author Joubert
 * @version 1.0
 * 
 *  creates a RMI, TCP socket or UDP datagram connetions
 *
 */
public interface JCL_connector {
	
	/**
	 * method to connect to a socket server with a port and an ip
	 * @param host - the machine host
	 * @param port - the machine port
	 */
	public abstract void connect (String host, int port);
	
	/**
	 * method to disconnect a socket connection 
	 * @return if connection has closed or not
	 */
	public abstract boolean disconnect ();
	
	/**
	 * enables synchronous communication. Java Ca&La is asynchronous. It uses
	 * threads and synchronous communication to provide asynchronous communications
	 * @param msg - the message to be sent
	 * @return a new message or null if nothing is received in timeout millisecs.
	 */
	public abstract JCL_message_result sendReceive(JCL_message msg);

	

	/**
	 * enables synchronous communication. Java Ca&La is asynchronous. It uses
	 * threads and synchronous communication to provide asynchronous communications
	 * @param msg - the message to be sent
	 * @return a new message or null if nothing is received in timeout millisecs.
	 */
	public abstract JCL_message_control sendReceive(JCL_message_control msg);

}
